Blog

BoxLang 1.0.0 Beta 14 Launched

Luis Majano September 13, 2024

Spread the word

Luis Majano

September 13, 2024

Spread the word


Share your thoughts

In this release, we are excited to introduce several new features and enhancements aimed at improving functionality and user experience. These updates include the creation of immutable query types, new server keys to aid on CLI tooling, and methods to identify runtime initiation modes.

Additionally, we've added an event announcement for dump rendering to enable better integration with external listeners. Read on to learn more about these features and how they can benefit your workflow.

TestBox Certified

However, the most exciting part of Beta 14 is that it is now fully certified for TestBox usage. That means that you can develop tests using either BoxLang or CFML with TestBox and everything should work and more. TestBox v6 is currently in development and we have very exciting news for BoxLang developers where you will be able to run your tests with no web server, pure CLI testing. Not only that, with test streaming and output collections. A new era of testing will begin for BoxLang!

Code Strong!

What is BoxLang?

BoxLang is a modern dynamic JVM language that can be deployed on multiple runtimes: operating system (Windows/Mac/*nix/Embedded), web server, lambda, iOS, android, web assembly, and more. BoxLang combines many features from different programming languages, including Java, CFML, Python, Ruby, Go, and PHP, to provide developers with a modern and expressive syntax.

It is also a drop-in replacement for Adobe ColdFusion and Lucee Engines.

How to get started?

Visit our docs at https://boxlang.ortusbooks.com and get coding today. If you want to try it out on the web then go to our online REPL at https://try.boxlang.io. You can also checkout our YouTube playlist: https://www.youtube.com/playlist?list=PLNE-ZbNnndB-40LvAbeSeT2Oi3V2gm_B8

Release Notes

Here are the latest release notes: https://boxlang.ortusbooks.com/readme/release-history/1.0.0-beta14

New Features

BL-93 Create immutable query type

We have now introduced the immutable query type. Any query in BoxLang can become immutable by just calling the toImmutable() method on it. This will lock the query into read-only mode. Great for multi-threaded operations or just data safety. You can also unlock immutable types via the toMutable() method.

// Just call the toImmutable() to lock the type
myData = myDataService.queryData().toImmutable()

// You can also unlock it via the toMutable() method
unlockedData = myData.toMutable()

BL-529 Announce the onBXDump whenever a dump is about to be rendered, to allow for external listeners to receive the dump

We have added a new global listener for the language: onBxDump which allows you to listen to any call to our dump component. This will allow developers to tap into the dumping facilities and intercept the dump calls. We are doing this in order to bring real-time dump facilities to VSCode.

function onBxDump( data ){
  .. listen to the dump call
}

All the arguments from the dump bif/component will be passed through.

BL-538 New runtime inCLIMode() method to tell you if the runtime was started via the runtime or something else

This is a new method in the BoxRuntime which allows developers or module authors to know if your runtime is in CLI mode or not. The server.boxlang also contains much more information about the modes you are in:

  • server.boxlang.cliMode - True or false if you are in CLI mode
  • server.boxlang.jarMode - True or false if running in JAR mode
  • server.boxlang.runtimeHome - The runtime home seeded in the runtime

BL-539 New server.cli key to provide you with all the CLI options used to run the runtime

There is a new server.cli structure that will assist CLI developers. It contains the following data:

  • server.cli.executionPath - From what directory was the runtime command called from
  • server.cli.command - The full raw commandline string used by the OS to call the binary + your command
  • server.cli.args - The raw array of arguments the command was called with
  • server.cli.parsed.options - A struct of name-value pairs of all the options detected in the CLI arguments.
  • server.cli.parsed.positionals - An array of positional arguments sent to the CLI

BoxLang will detect and parse the following conditions into the options struct:

  • --{name} - Will create a key called {name} with a value of true
  • --!{name} - Will create a key called {name} with a value of false
  • --no-{name} - Will create a key called {name} with a value of false
  • -{character} - Shorthands using a single character. The value will be true and the key will be the character used. Example: -p
  • -{characters} - You can use multi-shorthand characters and each of them will be keys in the struct with a value of true. Example: -abc will create a=true, b=true, c=true
  • --{name}=value - Will create a key called {name} with the value from the right side of the equals sign.
  • --{name}="value" - Will create a key called {name} with the value from the right side of the equals sign and removing the quotes.
  • --{name}='value' - Will create a key called {name} with the value from the right side of the equals sign and removing the single quotes

BL-540 Refactor the CLIOptions to it's own class and add a simple argument parser

In preparation to the inclusion of CommandBox commands into BoxLang we have also added our CLI utility to assist with argument parsing and detection. We have also encapsulated our CLI tooling in preparation for more in the next betas.

Improvements

BL-228 Consolidate/Rename "LS" Bifs and Move US-Centric ones to Compat

BL-409 Member method cleanup

BL-410 Improve REPL output of native Java arrays

BL-541 Add "decimal" as a cast type

Bugs

BL-496 replace and replaceNoCase functions do not accept a callback

BL-519 Query dereferencing is not working correctly: Column '1' does not exist in query

BL-520 Run Class via URL

BL-523 A class which uses inheritance, the metadata includes the inherited functions in itself and parent.

BL-524 reFindNoCase( "^(f|x)?test$", arguments.methodName ) fails with Cannot invoke "String.length()" because the return value of "java.util.regex.Matcher.group(int)" is null

BL-525 lsParseDateTime errors when given locale and mask

BL-526 dateformat incorrectly parsing date with leading 0's?

BL-527 onMissingMethod is not firing if the execution of the method is from within the class

BL-528 query dumps assume the value is simple and can explode with encodeForHTML() can't do complex objects

BL-530 Improve tracking of class in function box context

BL-531 Difference of behavior with cfdirectory recurse = true not including path

BL-532 super long strings cause compilation errors due to limitations in Java source code

BL-533 Errors in miniserver when flushing large amounts of output to buffer

BL-534 Missing !== operator

BL-535 query cell assign erroring

BL-537 Add onBifInvocation Interception Announcement to BIF invoke method

Add Your Comment

Recent Entries

The Hidden Costs of In-House Database Management

The Hidden Costs of In-House Database Management

The Hidden Costs of In-House Database Management


Opting for in-house database management involves more than just a salary. Here are some often-overlooked costs associated with maintaining your own DBA team.



1. High Salaries and Benefits


Hiring skilled DBAs is expensive. According to industry reports, the average salary of a DBA in the U.S. can range from $85,000 to over $130,000 per year, depending on experience and expertise. When you add ...

Cristobal Escobar
Cristobal Escobar
November 20, 2024
5 Signs It’s Time to Modernize Your ColdFusion / CFML Application

5 Signs It’s Time to Modernize Your ColdFusion / CFML Application

ColdFusion has long been a reliable platform for building web applications, but like any technology, it requires maintenance and modernization over time. Whether you're using Lucee or Adobe ColdFusion, it’s critical to recognize the signs that your application is no longer meeting today’s standards in performance, security, and scalability. Let’s explore five clear indicators that it’s time to modernize your ColdFusion application and how ColdFusion consulting can help breathe new life into y...

Cristobal Escobar
Cristobal Escobar
November 19, 2024
ColdBox Free Tip 5 - Building Named Routes with a Struct

ColdBox Free Tip 5 - Building Named Routes with a Struct

**Did you know ColdBox provides flexible ways to build routes using structs?** In this tip, we’ll cover how to use the `event.buildLink()` and `event.route()` methods for named routes, a feature that’s especially handy when working with dynamic URLs.

Maria Jose Herrera
Maria Jose Herrera
November 19, 2024